package com.itdct.onflow.core.extend

import cn.hutool.core.io.FileUtil
import com.itdct.onflow.core.util.StringUtil
import java.nio.charset.Charset

/**
 * @author DCTANT
 * @date 2021/4/20 10:30:28
 * @description
 */
fun String.toCamelCase(): String {
    val toCamelCase = StringUtil.toCamelCase(this)
    return toCamelCase
}

fun String.toBigCamelCase():String{
    val toBigCamelCase = StringUtil.toBigCamelCase(this)
    return toBigCamelCase
}

fun String.toSmallCamelCase():String{
    val toSmallCamelCase = StringUtil.toSmallCamelCase(this)
    return toSmallCamelCase
}

fun String.toUnderlineCase(): String {
    val toUnderlineCase = StringUtil.toUnderlineCase(this)
    return toUnderlineCase
}

fun String.writeFile(path: String): String {
    FileUtil.writeString(this, path, Charset.defaultCharset())
    return this
}